
import java.util.Scanner;



/**
 *
 * @author XuanHung
 */
public class clsSoPhuc {
    private int m_iThuc;
    private int m_iAo;
    
    public void setThuc(int _iThuc){
        m_iThuc = _iThuc;
    }
    public int getThuc(){
        return m_iThuc;
    }
    
    public void setAo(int _iAo){
        m_iAo = _iAo;
    }
    
    public int getAO(){
        return m_iAo;
    }
    public clsSoPhuc(){
        m_iAo = 0;
        m_iThuc = 0;
    }
    public clsSoPhuc (int _iAo, int _iThuc){
        m_iAo = _iAo;
        m_iThuc = _iThuc;
    }
    
    public clsSoPhuc TongSoPhuc(clsSoPhuc sp){        
        sp.m_iAo = sp.m_iAo + this.m_iAo;
        sp.m_iThuc = sp.m_iThuc + this.m_iThuc;
        return sp;
    }
    public void Tong(clsSoPhuc sp){
        clsSoPhuc sp1 = this.TongSoPhuc(sp);
        System.out.println("Phan thuc" + sp1.getThuc());
        System.out.println("Phan Ao" + sp1.getAO());
    }  
    public void NhapSoPhuc(){
        Scanner sn = new Scanner(System.in);                              
        System.out.print("Nhap Phan Thuc");
        this.setThuc(sn.nextInt());
        System.out.print("Nhap Phan Ao");
        this.setAo(sn.nextInt());
        
    }
}
